package lecture;

import employee.Employee;
import model.Entity;

public class LectureEntity extends Entity{
	protected Employee owner = null;
	protected float length = 0;
	protected String exam = null;

	public LectureEntity(){
		super("Default");
	}
	
	public LectureEntity(String name, Employee owner, float length, String exam)
	{
		super(name);
		this.owner = owner;
		this.length = length;
		this.exam = exam;
		
	}
	
	public LectureEntity(String name)
	{
		this(name,null, 0, "?");
	}
	
	
	public Employee getOwner() {
		return owner;
	}

	public void setOwner(Employee owner) {
		this.owner = owner;
	}

	public float getLength() {
		return length;
	}

	public void setLength(float length) {
		this.length = length;
	}

	public String getExam() {
		return exam;
	}

	public void setExam(String exam) {
		this.exam = exam;
	}

	public String toString()
	{
		StringBuilder tmp = new StringBuilder("Lecture Entity");
		tmp.append("\nname"); tmp.append(this.getName());
		tmp.append("\nowner"); tmp.append(this.owner.getFirstName());tmp.append(" "); tmp.append(this.owner.getName());
		tmp.append("\nlength (H): "); tmp.append(this.length);
		tmp.append("\nexam protocol: "); tmp.append(this.exam);
		return tmp.toString();	
	}

}
